import { post, get } from './http'
export const getLoginStatus = (params) => post(`admin/login`, params)
export const loginTest = (params) => get('admin/test', params)
export const setSinger = (params) => post('singer/add', params)
export const getAllSinger = (params) => get('singer/allSinger', params)
export const updateSinger = (params) => post('singer/update', params)
export const delSinger = (params) => get(`singer/delete?ids=${params}`)
export const addSong = (params) => post(`song/add`, params)
export const searchSingerId = (params) => post(`song/search_singerId`, params)
export const updateSong = (params) => post(`song/update`, params)
export const delSong = (params) => get(`song/delete?songId=${params}`)

export const delsongList = (params) => post(`songList/delete?id=${params}`)
export const getAllsongList = (params) => post(`songList/selectAll`, params)
export const setsongList = (params) => post(`songList/add`, params)
export const updatesongList = (params) => post(`songList/update`, params)

export const ListSongById = (params) => post(`listsong/ListSongById?songListId=${params}`)
export const searchSongId = (params) => get(`song/song_id?songId=${params}`)
export const songOfSongName = (params) => get(`song/songOfSongName?songOfSongName=${params}`)
export const listSongAdd = (songId, songListId) => post(`listsong/add?songId=${songId}&songListId=${songListId}`)
// export const listSongAdd = (songId, songListId) => post(`listsong/test?songId=${songId}&songListId=${songListId}`)
export const delListSong = (songId, songListId) => post(`listsong/delete?songId=${songId}&songListId=${songListId}`)

export const getAllConsumer = (params) => post('consumer/selectAll', params)
export const setConsumer = (params) => post(`consumer/add`, params)
export const updateConsumer = (params) => post(`consumer/update`, params)
export const delConsumer = (params) => post(`consumer/delete?id=${params}`)
export const getUserOfId = (params) => post(`/consumer/selectById?id=${params}`)

export const getAllSong = (params) => get(`/song/allSong`)
export const getConsumerBySex = (params) => post(`/consumer/sex`)
export const getSongByStyle = (params) => post(`/songList/songStyle`)
export const getSingerBySex = (params) => post(`/singer/sex`)
export const getSingerByCountry = (params) => post(`/singer/singerByCountry`)

export const getCollectOfUserId = (id) => get(`/collect/searchByUserId?id=${id}`)
export const delCollect = (params) => post(`/collect/delete`, params)

export const getAllCommentBySongListId = (id) => get(`/comment/commitBySongListId?SongListId=${id}`)
export const delComment = (params) => post(`/comment/delete?id=${params}`)
